<template>
  <div>
    <div
      class="item"
      v-for="(item, index) in roomList"
      :key="index"
      @click="goToxq(item.houseCode)"
      :id="item.houseCode"
    >
      <div class="img">
        <img :src="'http://liufusong.top:8080' + item.houseImg" alt="" />
      </div>
      <div class="text">
        <div class="title">
          <span>{{ item.title }}</span>
        </div>
        <div class="msg">
          <span>{{ item.desc }}</span>
        </div>
        <div class="tips" v-for="(item1, index1) in item.tags">{{ item1 }}</div>
        <div class="price">
          <span>{{ item.price }} 元/月</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "VueHkzfFindItem",
  props: ["roomList"],
  data() {
    return {
      id: "",
    };
  },

  mounted() {},

  methods: {
    goToxq(id) {
      this.id = id;
      this.$router.push({
        path: `/xq?id=${this.id}`,
      });
    },
  },
};
</script>

<style lang="less" scoped>
.text {
  width: 252px;
  height: 102px;
}
.item {
  border-bottom: 1px solid #efefef;
  border-top: 1px solid #efefef;
  display: flex;
  margin: 0 auto;
  width: 345px;
  height: 120px;
  align-items: center;
  .img {
    margin-right: 10px;
    width: 106px;
    height: 80px;
    background-color: pink;
    img {
      width: 106px;
      height: 80px;
    }
  }
  .title {
    span {
      font-size: 15px;
      color: #394043;
    }
  }
  .msg {
    span {
      font-size: 12px;
      color: #afb2b3;
    }
  }
  .tips {
    display: inline-block;
    font-size: 12px;
    border-radius: 3px;
    padding: 4px 5px;
    margin-right: 5px;
    line-height: 12px;
    color: #39becd;
    background: #e1f5f8;
  }
  .price {
    span {
      font-size: 12px;
      color: #fa5741;
    }
  }
}
</style>
